package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	Name    string `gorm:"type:varchar(30);not null"`
	Context string `gorm:"type:varchar(200);not null"`
	Comment string `gorm:"type:varchar(200);not null"`
	Price   int64  `gorm:"type:int(11);not null"`
}

func (g *Goods) GoodsAdd(db *gorm.DB) error {
	return db.Debug().Create(&g).Error
}
